package ysq.xyg.web.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 业务模块-视频管理实体类
 *
 * @author shengQiang yu
 * @date 2019-7-7 15:49:32
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_web_video")
public class WebVideo implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;
	
	/**
     * 标题
     */ 
	@Column(name = "title")
	private String title;
	
	/**
     * 图片
     */ 
	@Column(name = "picture")
	private String picture;
	
	/**
     * 视频分类：1、公益培训  2、非遗传习 ，3、品牌活动  4、非遗项目
     */ 
	@Column(name = "video_type")
	private String videoType;
	
	/**
     * url
     */ 
	@Column(name = "url")
	private String url;
	
	/**
     * 描述
     */ 
	@Column(name = "descript")
	private String descript;
	
	/**
     * 状态：1、启用，2、禁用
     */ 
	@Column(name = "status")
	private String status;
	
	/**
     * 排序
     */ 
	@Column(name = "sort")
	private String sort;
	
	/**
     * 删除标注:1、正常，2、删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	
	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;
	
	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;
	
	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;
	

	public WebVideo(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}